import myCalendar from "@/components/plugins/uni-calendar/components/uni-calendar/uni-calendar.vue";
import myCalendarScroll from "@/components/plugins/uni-calendar/components/uni-calendar/uni-calendar-swiper.vue";
import myPopup from "@/components/plugins/uni-popup/components/uni-popup/uni-popup.vue";
import myPopupDialog from "@/components/plugins/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue";
import mypopupMessage from "@/components/plugins/uni-popup/components/uni-popup-message/uni-popup-message.vue";
import myPopupShare from "@/components/plugins/uni-popup/components/uni-popup-share/uni-popup-share.vue";

// 导入需要全局注册的组件
import appPageIndex from "@/components/mainPage/appPageIndex/index.vue";
import componentsIndex from "@/components/mainPage/componentsIndex/index.vue";
// 组件类页面
import loginMenu from "@/components/menuPage/loginMenu.vue";
import panelMenu from "@/components/menuPage/panelMenu.vue";
import hstabMenu from "@/components/menuPage/hstabMenu.vue";
import listMenu from "@/components/menuPage/listMenu.vue";
import searchMenu from "@/components/menuPage/searchMenu.vue";
import userMenu from "@/components/menuPage/userMenu.vue";
import tabMenu from "@/components/menuPage/tabMenu.vue";
import layoutMenu from "@/components/menuPage/layoutMenu.vue";
import boothMenu from "@/components/menuPage/boothMenu.vue";
import topNavMenu from "@/components/menuPage/topNavMenu.vue";
import setOptionsMenu from "@/components/menuPage/setOptionsMenu.vue";
// 顶部导航
import topNav001 from "@/components/publicComponents/topNavs/topNav001.vue";
import topNav002 from "@/components/publicComponents/topNavs/topNav002.vue";
import topNav003 from "@/components/publicComponents/topNavs/topNav003.vue";
// 底部导航
import tabBar001 from "@/components/publicComponents/tabBars/tabBar001.vue";
import tabBar002 from "@/components/publicComponents/tabBars/tabBar002.vue";
// 登录页面
import login001 from "@/components/publicComponents/logins/login001.vue";
import login002 from "@/components/publicComponents/logins/login002.vue";
import login003 from "@/components/publicComponents/logins/login003.vue";
import login004 from "@/components/publicComponents/logins/login004.vue";
import login005 from "@/components/publicComponents/logins/login005.vue";
// 面板
import panel001 from "@/components/publicComponents/panels/panel001.vue";
import panel002 from "@/components/publicComponents/panels/panel002.vue";
import panel003 from "@/components/publicComponents/panels/panel003.vue";
import panel004 from "@/components/publicComponents/panels/panel004.vue";
import panel005 from "@/components/publicComponents/panels/panel005.vue";
import panel006 from "@/components/publicComponents/panels/panel006.vue";
// 横向滚动
import hstab001 from "@/components/publicComponents/hstabs/hstab001.vue";
import hstab002 from "@/components/publicComponents/hstabs/hstab002.vue";
import hstab003 from "@/components/publicComponents/hstabs/hstab003.vue";
import hstab004 from "@/components/publicComponents/hstabs/hstab004.vue";
import hstab005 from "@/components/publicComponents/hstabs/hstab005.vue";
import hstab006 from "@/components/publicComponents/hstabs/hstab006.vue";
import hstab007 from "@/components/publicComponents/hstabs/hstab007.vue";
import hstab008 from "@/components/publicComponents/hstabs/hstab008.vue";
import hstab009 from "@/components/publicComponents/hstabs/hstab009.vue";
import hstab010 from "@/components/publicComponents/hstabs/hstab010.vue";
// 列表
import list001 from "@/components/publicComponents/lists/list001.vue";
import list002 from "@/components/publicComponents/lists/list002.vue";
import list003 from "@/components/publicComponents/lists/list003.vue";
import list004 from "@/components/publicComponents/lists/list004.vue";
import list005 from "@/components/publicComponents/lists/list005.vue";
// 搜索框
import search001 from "@/components/publicComponents/searchs/search001.vue";
import search002 from "@/components/publicComponents/searchs/search002.vue";
import search003 from "@/components/publicComponents/searchs/search003.vue";
import search004 from "@/components/publicComponents/searchs/search004.vue";
import search005 from "@/components/publicComponents/searchs/search005.vue";
import search006 from "@/components/publicComponents/searchs/search006.vue";

// 用户信息
import userInfo001 from "@/components/publicComponents/userInfos/userInfo001.vue";
import userInfo002 from "@/components/publicComponents/userInfos/userInfo002.vue";
import userInfo003 from "@/components/publicComponents/userInfos/userInfo003.vue";
// 选项卡
import tab001 from "@/components/publicComponents/tabs/tab001.vue";
import tab002 from "@/components/publicComponents/tabs/tab002.vue";
import tab003 from "@/components/publicComponents/tabs/tab003.vue";
import tab004 from "@/components/publicComponents/tabs/tab004.vue";
import tab005 from "@/components/publicComponents/tabs/tab005.vue";
import tab006 from "@/components/publicComponents/tabs/tab006.vue";
import tab007 from "@/components/publicComponents/tabs/tab007.vue";
import tab008 from "@/components/publicComponents/tabs/tab008.vue";
import tab009 from "@/components/publicComponents/tabs/tab009.vue";
// 布局
import layout001 from "@/components/publicComponents/layouts/layout001.vue";
import layout002 from "@/components/publicComponents/layouts/layout002.vue";
import layout003 from "@/components/publicComponents/layouts/layout003.vue";
import layout004 from "@/components/publicComponents/layouts/layout004.vue";
import layout005 from "@/components/publicComponents/layouts/layout005.vue";
import layout006 from "@/components/publicComponents/layouts/layout006.vue";
// 展位
import booth001 from "@/components/publicComponents/booths/booth001.vue";
import booth002 from "@/components/publicComponents/booths/booth002.vue";
import booth003 from "@/components/publicComponents/booths/booth003.vue";
import booth004 from "@/components/publicComponents/booths/booth004.vue";
import booth005 from "@/components/publicComponents/booths/booth005.vue";
import booth006 from "@/components/publicComponents/booths/booth006.vue";
// 注册全局组件

import setOptions001 from "@/components/publicComponents/setOptions/setOptions001.vue";
import setOptions002 from "@/components/publicComponents/setOptions/setOptions002.vue";
import setOptions003 from "@/components/publicComponents/setOptions/setOptions003.vue";
import setOptions004 from "@/components/publicComponents/setOptions/setOptions004.vue";

// 公共触发组件
import myPopupGlobalt from "@/components/publicComponents/global/popup.vue";
const myComponents = {
  plugins: {
    myCalendar, //日历插件
    myCalendarScroll,
    myPopup, //弹窗
    myPopupDialog, //弹窗输入
    mypopupMessage, //弹窗消息
    myPopupShare, //弹窗分享
  },
  global: {
    myPopupGlobalt,
  },
  // 组件组合展示页面
  setOptions: {
    setOptions001,
    setOptions002,
    setOptions003,
    setOptions004,
  },
  // 菜单页面
  menuPage: {
    loginMenu,
    panelMenu,
    hstabMenu,
    listMenu,
    searchMenu,
    userMenu,
    tabMenu,
    layoutMenu,
    boothMenu,
    topNavMenu,
    setOptionsMenu,
  },
  // 主页面
  mian: {
    appPageIndex,
  },

  menuPage: {
    loginMenu,
    panelMenu,
    hstabMenu,
    listMenu,
    searchMenu,
    userMenu,
    tabMenu,
    layoutMenu,
    boothMenu,
    topNavMenu,
    setOptionsMenu,
  },
  mian: {
    appPageIndex, //组件入口页面
    componentsIndex, //app页面入口页面
  },
  booth: {
    booth001,
    booth002,
    booth003,
    booth004,
    booth005,
    booth006,
  },
  topNav: {
    topNav001,
    topNav002,
    topNav003,
  },
  tabBar: {
    tabBar001,
    tabBar002,
  },
  login: {
    login001,
    login002,
    login003,
    login004,
    login005,
  },
  panel: {
    panel001,
    panel002,
    panel003,
    panel004,
    panel005,
    panel006,
  },
  list: {
    list005,
    list001,
    list002,
    list003,
    list004,
  },
  hstab: {
    hstab001,
    hstab010,
    hstab009,
    hstab008,
    hstab007,
    hstab002,
    hstab003,
    hstab004,
    hstab005,
    hstab006,
  },
  search: {
    search001, //闲鱼搜索框
    search002, //大麦搜索框
    search003, //得物搜索框
    search004, //京东搜索框
    search005, //懂车帝
    search006, //唯品会
  },
  userInfo: {
    userInfo003, //唯品会
    userInfo002, //京东
    userInfo001, //腾讯视频
  },
  tab: {
    tab001,
    tab002,
    tab003,
    tab004,
    tab005,
    tab006,
    tab007,
    tab008,
    tab009,
  },
  layout: {
    layout001,
    layout002,
    layout003,
    layout004,
    layout005,
    layout006,
  },
};
export const myComponentsNames = [];
export default {
  install(app) {
    for (const key in myComponents) {
      myComponentsNames[key] = [];
      for (const item in myComponents[key]) {
        myComponentsNames[key].push(item);
        app.component(item, myComponents[key][item]);
      }
    }
  },
};
